package com.netdisk.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.netdisk.entity.User;
import com.opensymphony.xwork2.ActionSupport;

@Component("quit")
@Scope("prototype")
public class Quit extends ActionSupport{
	@Override
	public String execute() throws Exception {
		HttpServletRequest request = ServletActionContext.getRequest();
		HttpSession session = request.getSession();
		session.removeAttribute("user");
		session.removeAttribute("logined");
		return SUCCESS;
	}
}
